<?php

namespace app\shopapi\controller;

use app\admin\model\shop\Category;
use app\common\controller\Shopapi;
use app\shopapi\model\ShopAdmin;
use app\shopapi\model\ShopUser;

/**
 * 店铺团购订单接口
 */
class Order extends Shopapi
{
    protected $noNeedRight = '*';


    //团购订单信息
    public function verifyInfo()
    {
        $order_no = input('verify_code','');
        try {

            $model = new \app\shopapi\model\ShopOrder();

            $res = $model->verifyInfo($order_no,$this->shopauth->shop_id);

        } catch (\Exception $e) {
            $this->error($e->getMessage());
        }
        $this->success('',$res);
    }


    //核销订单
    public function verify()
    {
        $order_no = input('verify_code','');
        try {

            $model = new \app\shopapi\model\ShopOrder();

            $res = $model->verify($order_no,$this->shopauth->shop_id,$this->shopauth->id);

        } catch (\Exception $e) {
            $this->error($e->getMessage());
        }
        $this->success('核销成功',$res);
    }
}